package com.grt192.benchtest.controller;

import com.grt192.benchtest.mechanism.BenchMechanism;
import com.grt192.core.EventController;
import com.grt192.event.SensorEvent;
import com.grt192.event.component.ButtonListener;
import com.grt192.mechanism.GRTDriverStation;
import com.grt192.sensor.GRTJoystick;

/**
 *
 * @author anand
 */
public class BenchController extends EventController implements ButtonListener {

    private BenchMechanism bench;
    private GRTDriverStation ds;

    public BenchController(BenchMechanism b, GRTDriverStation ds) {
        this.ds = ds;
        bench = b;
        ((GRTJoystick) ds.getSensor("leftJoystick")).addButtonListener(this);
        ((GRTJoystick) ds.getSensor("rightJoystick")).addButtonListener(this);

    }

    public void buttonUp(SensorEvent e, String key) {
        bench.testTimedPorts();
    }

    public void buttonDown(SensorEvent e, String key) {
    }
}
